home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97a.txt
/
000006_icon-group-sender _Sat Jan 4 00:03:06 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Received: by cheltenham.cs.arizona.edu; Fri, 3 Jan 1997 17:24:06 MST
Date: Sat, 04 Jan 1997 00:03:06 GMT
From: ia@stryx.demon.co.uk (Iain Alexander)
Reply-To: ia@stryx.demon.co.uk
Message-Id: <17370@stryx.demon.co.uk>
To: icon-group@cs.arizona.edu
Subject: Re: Help for an Icon Neophyte
X-Mailer: PCElm 1.10
Lines: 39
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 1201
In message <32CC0638.692B@ohsu.edu> Stuart Robinson writes:
Well, I'm no expert, but I think I can answer most of your questions.
> I assume that I want to use something like map(line, &ucase, &lcase),
> but where should I insert it?
I suggest either
while line := read() do
map(line, &ucase, &lcase) ? { ... }
or
while line := map(read(), &ucase, &lcase) do
line ? { ... }
> And should the csets &ucase and &lcase be bracketted by
> single quotations marks?
No, they're (special) variable names. You would use quotation
marks if you were defining the sets explicitly e.g.
'abcdefghijklmnopqrstuvwxyz'
> Second, the program seems to hang up at the
> end. I have no idea why that's happening.
The loop
> while num +:= 1 do {
> write(left(num||" "||get(wlist), 12), right(get(wlist), 4))
> }
has no way of terminating. It doesn't care whether the write(...)
succeeds or fails. You want it to stop when the get() fails
because it's run out of words. I think you can say
num := 1
while write(left(num||" "||get(wlist), 12), right(get(wlist), 4)) do {
num +:= 1
}
--
Iain Alexander ia@stryx.demon.co.uk
I.Alexander@bra0125.wins.icl.co.uk